<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script src="./src/vue.js"></script>
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <Login></Login>
    </div>
    <template id="login">
      <div>
        <h3>登录组件</h3>
      </div>
    </template>
    <script>
      // 1. 声明组件配置对象
      const Login = {
        template: "#login",
        data() {
          return {};
        },
        components: {},
      };
      // 局部组件：通过某个父组件内部的components属性来注册子组件，仅限父组件内部使用。
      const vm = new Vue({
        el: "#app",
        data: {},
        components: {
          Login,
        },
      });
    </script>
  </body>
</html>
